/**
 * 
 */
package com.munoor.dalai.server.model;

import java.util.HashMap;
import java.util.Map;

/**
 * @author Osho Ilamah
 * @since  version 1.0 (07 April 2011)
 */
public class DataMapService {
	//private static Map<Long, Company> companyMap;
	private static final Map<Integer, String> categoryMap = getCategoryMap();
	private static final Map<String, String> locationMap = getLocationMap();

 
    public static String getLocation(String locationId) {
    	String location = locationMap.get(locationId);
    	if (location != null){
    		return location;
    	}else{
    		return "National";
    	}
    }
    
    
    public static String getCategory(short categoryId) {   	
    	String c = categoryMap.get(new Integer(categoryId));
    	if (c != null){
    		return c;
    	}else{
    		return "All";
    	}
    }
    
    
    private static Map<Integer, String> getCategoryMap(){
    	Map<Integer, String> map = new HashMap<Integer, String>();
    	map.put(1000,"All");
    	map.put(100,"Admin");
    	map.put(200,"Banking/Finance");
    	map.put(300,"Civil Services");
    	map.put(400,"Education");
    	map.put(500,"Engineering");
    	map.put(600,"Hospitality/Medical/Legal");
    	map.put(700,"IT/Telecomunications ");
    	map.put(800,"Management");
    	map.put(900,"Others");
    	return map;
    }
    
    private static Map <String, String> getLocationMap(){
    	Map<String, String> map = new HashMap<String, String>(57);  //assuming total entry count of 42 with load factor of 0.75
    	map.put("@0", "National");
    	map.put("@00010010", "Lagos");
    	map.put("@01100001", "Abuja");
    	map.put("@00100110", "PHC/Rivers");
    	map.put("@0001", "South West");
    	map.put("@0010", "South South");
    	map.put("@0011", "South East");
    	map.put("@0110", "North Central");
    	map.put("@00110011", "Abia");
    	map.put("@01110001", "Adamawa");
    	map.put("@00100001", "Akwa-Ibom");
    	map.put("@00110001", "Anambra");
    	map.put("@01100010", "Bauchi");
    	map.put("@00100010", "Bayelsa");
    	map.put("@01100011", "Benue");
    	map.put("@01110010", "Borno");
    	map.put("@00100011", "CrossRiver");
    	map.put("@00100100", "Delta");
    	map.put("@00110100", "Ebonyi");
    	map.put("@00100101", "Edo");
    	map.put("@00010001", "Ekiti");
    	map.put("@00110010", "Enugu");
    	map.put("@01110011", "Gombe");
    	map.put("@00110101", "Imo");
    	map.put("@01100100", "Jigawa");
    	map.put("@01100101", "Kaduna");
    	map.put("@01100110", "Kano");
    	map.put("@01010001", "Katsina");
    	map.put("@01010010", "Kebbi");
    	map.put("@01100111", "Kogi");
    	map.put("@01101000", "Kwara");
    	map.put("@01101001", "Nasarawa");
    	map.put("@01101010", "Niger");
    	map.put("@00010011", "Ogun");
    	map.put("@00010100", "Ondo");
    	map.put("@00010101", "Osun");
    	map.put("@00010110", "Oyo");
    	map.put("@01101011", "Plateau");
    	map.put("@01010011", "Sokoto");
    	map.put("@01110100", "Taraba");
    	map.put("@01110101", "Yobe");
    	map.put("@01010100", "Zamfara");
    	return map;
    }
    
}
